There has been considerable interest in recent times in the provision of web services, i.e. the provision of services on the internet that do not simply provide web pages for display to human users.
One approach that has been adopted to deal with this situation is a registry or repository for defining aspects of web-available services. For example, the universal description discovery and integration (UDDI) standard defines an extended markup language (XML) based registry that allows services to be published with details about the service provided. Such registries can be interrogated for further information which may, for example, include web service description language (WSDL) documents defining web services, including protocol bindings and message formats. The registry will normally be interrogated by messages in a standard format, such as the SOAP format (formally an abbreviation of Simple Object Access Protocol), or other suitable formats.
There are a number of models for exchanging data from a server with the data to a client to which the data is provided. In a traditional client-server approach, all of the information about the data format is hidden from the client, that is to say encapsulated.
A development of this approach is known as the Representational State Transfer (REST) approach, in which an artifact is transferred from a server to a client using one of a number of standard data types. The data type used for the transfer may be selected dynamically, for example based on the capability or desire of the client and the nature of the artifact. The representation may include instructions in a standard format, for example Java instructions where the client is known to support Java.
The interface does not reveal whether the data type used for the transfer is the format stored by the server to store the data, or merely a derivation of that format, so in this sense there is encapsulation.
The REST approach is a stateless approach, that is to say the server does not store the state of the session with the client. The session state is therefore kept only on the client.
The drawings are purely schematic and not to scale.